﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Web.Mvc
{
    public static class UrlHelperExtensions
    {
        public static string Content(this UrlHelper helper, string contentPath, string areaName)
        {
            if (contentPath[0] == '~')
                contentPath = contentPath.Substring(1);

            return helper.Content("~/" + areaName + contentPath);
        }

        public static string Resource(this UrlHelper helper, string contentPath, string areaName)
        {
            if (contentPath[0] == '~')
                contentPath = contentPath.Substring(1);

            return helper.Content("~/Areas/" + areaName + contentPath);
        }
    }
}
